﻿<%@ Page Title="Stock Dealer Extranet" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmStockDealerExtranet.aspx.cs" Inherits="Crosland.Automotriz.Web.Vehiculos.wFrmStockDealerExtranet" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">

 <script type="text/javascript">

     function ShowDrillDown() {
         var mainElement = PivotGrid.GetMainElement();
         DrillDownWindow.ShowAtPos(ASPxClientUtils.GetAbsoluteX(mainElement), ASPxClientUtils.GetAbsoluteY(mainElement));
     }

     function MostrarAlerta() {
         popupErrores.Show();
     }

    </script>

    <input runat="server" id="ColumnIndex" type="hidden" enableviewstate="true" />
    <input runat="server" id="RowIndex" type="hidden" enableviewstate="true" />

    <div class="main-header" style="width:100%;">
        <div class="main-titulo" style="text-align: left">
            Venta Externa - Stock Dealer</div>
    </div>

    <div style="padding: 10px">
                      <table width="100%">
                          <tr>
                              <td width="115px">
                      <dx:ASPxButton ID="btnConsultar" runat="server" 
                          CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                          CssPostfix="Office2010Blue" 
                          SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Consultar" 
                                      Width="100px" onclick="btnConsultar_Click">
                          <Image Url="~/Images/search.png">
                          </Image>
                      </dx:ASPxButton>
                              </td>
                              <td>
                                  <dx:ASPxButton ID="btnSalir" runat="server" 
                                      CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                      CssPostfix="Office2010Blue" onclick="btnSalir_Click" 
                                      SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Salir" 
                                      Width="100px">
                                      <Image Url="~/Images/logout.png">
                                      </Image>
                                  </dx:ASPxButton>
                              </td>
                          </tr>
                          <tr>
                              <td colspan="2">
                                  <hr />
                              </td>
                          </tr>
                      </table>
                      <table width="100%" border="0" cellpadding="5" 
        cellspacing="0">
                          <tr>
                              <td style="width: 33px">
                      <asp:Label ID="Label1" runat="server" ForeColor="Black" Text="Año:"></asp:Label>
                              </td>
                              <td width="110">
                      <dx:ASPxComboBox ID="cboAño" runat="server" 
                          CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                          CssPostfix="Office2010Blue" Spacing="0" 
                          SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                          Width="100px">
                          <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                          </LoadingPanelImage>
                          <LoadingPanelStyle ImageSpacing="5px">
                          </LoadingPanelStyle>
                          <ButtonStyle Width="20px">
                          </ButtonStyle>
                          <Paddings PaddingLeft="5px" />
                      </dx:ASPxComboBox>
                              </td>
                              <td style="width: 31px">
                      <asp:Label ID="Label2" runat="server" ForeColor="Black" Text="Mes:"></asp:Label>
                              </td>
                              <td width="105">
                      <dx:ASPxComboBox ID="cboMes" runat="server" 
                          CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                          CssPostfix="Office2010Blue" Spacing="0" 
                          SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                          SelectedIndex="0" Width="100px">
                          <Items>
                              <dx:ListEditItem Selected="True" Text="Enero" Value="1" />
                              <dx:ListEditItem Text="Febrero" Value="2" />
                              <dx:ListEditItem Text="Marzo" Value="3" />
                              <dx:ListEditItem Text="Abril" Value="4" />
                              <dx:ListEditItem Text="Mayo" Value="5" />
                              <dx:ListEditItem Text="Junio" Value="6" />
                              <dx:ListEditItem Text="Julio" Value="7" />
                              <dx:ListEditItem Text="Agosto" Value="8" />
                              <dx:ListEditItem Text="Setiembre" Value="9" />
                              <dx:ListEditItem Text="Octubre" Value="10" />
                              <dx:ListEditItem Text="Noviembre" Value="11" />
                              <dx:ListEditItem Text="Diciembre" Value="12" />
                          </Items>
                          <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                          </LoadingPanelImage>
                          <LoadingPanelStyle ImageSpacing="5px">
                          </LoadingPanelStyle>
                          <ButtonStyle Width="20px">
                          </ButtonStyle>
                          <Paddings PaddingLeft="5px" />
                      </dx:ASPxComboBox>
                              </td>
                              <td style="width: 44px">
                <asp:Label runat="server" Text="Marca:" ForeColor="Black" ID="Label5"></asp:Label>

                              </td>
                              <td align="left">
                <dx:ASPxComboBox runat="server" Spacing="0" Width="150px" 
                                      SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                      CssPostfix="Office2010Blue" 
                                      CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" ID="cboMarca">
<LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif"></LoadingPanelImage>

<LoadingPanelStyle ImageSpacing="5px"></LoadingPanelStyle>

<ButtonStyle Width="20px"></ButtonStyle>

<Paddings PaddingLeft="5px"></Paddings>
</dx:ASPxComboBox>

                              </td>
                          </tr>
                          <tr>
                              <td colspan="6">
                                  <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                      <tr>
                                          <td style="width: 69px">
                                              <asp:Label ID="Label6" runat="server" ForeColor="Black" Text="Supervisor:"></asp:Label>
                                          </td>
                                          <td style="width: 300px">
                                              <asp:Label ID="lblSupervisor" runat="server" Font-Bold="True" ForeColor="Black"></asp:Label>
                                          </td>
                                          <td style="width: 47px">
                                              <asp:Label ID="Label7" runat="server" ForeColor="Black" Text="Cliente:"></asp:Label>
                                          </td>
                                          <td>
                                              <asp:Label ID="lblCliente" runat="server" Font-Bold="True" ForeColor="Black"></asp:Label>
                                              <asp:Label ID="lblIdCliente" runat="server" Visible="False"></asp:Label>
                                          </td>
                                      </tr>
                                  </table>
                              </td>
                          </tr>
                      </table>

                      <dx:ASPxPivotGrid ID="pv" runat="server" ClientIDMode="AutoID" Width="600px" 
                          ClientInstanceName="PivotGrid">
                          <Fields>
                              <dx:PivotGridField ID="fieldCantidad" Area="DataArea" AreaIndex="0" 
                                  Caption="Cantidad" FieldName="Cantidad">
                              </dx:PivotGridField>
                              <dx:PivotGridField ID="fieldRuedas" Area="RowArea" AreaIndex="0" 
                                  Caption="Ruedas" FieldName="Ruedas">
                              </dx:PivotGridField>
                              <dx:PivotGridField ID="fieldModelo" Area="RowArea" AreaIndex="1" 
                                  Caption="Modelo" FieldName="Modelo">
                              </dx:PivotGridField>
                              <dx:PivotGridField ID="fieldTipo" Area="ColumnArea" AreaIndex="0" 
                                  Caption="Tipo" FieldName="Tipo">
                              </dx:PivotGridField>
                              <dx:PivotGridField ID="fieldIdvensellinoutstock" Area="RowArea" AreaIndex="1" 
                                  Caption="Id_ven_sell_in_out_stock" FieldName="Id_ven_sell_in_out_stock" 
                                  Visible="False">
                              </dx:PivotGridField>
                          </Fields>
                          <OptionsView ShowColumnGrandTotalHeader="False" ShowColumnGrandTotals="False" 
                              ShowRowGrandTotalHeader="False" ShowFilterHeaders="False" />
                          <OptionsPager Position="Bottom" Visible="False">
                          </OptionsPager>
                          <OptionsLoadingPanel>
                              <Image Url="~/App_Themes/Office2010Blue/PivotGrid/Loading.gif">
                              </Image>
                              <Style ImageSpacing="5px">
                              </Style>
                          </OptionsLoadingPanel>
                          <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                              <CustomizationFieldsBackground Url="~/App_Themes/Office2010Blue/PivotGrid/pcHBack.png">
                              </CustomizationFieldsBackground>
                              <LoadingPanel Url="~/App_Themes/Office2010Blue/PivotGrid/Loading.gif">
                              </LoadingPanel>
                          </Images>
                          <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                              CssPostfix="Office2010Blue">
                              <LoadingPanel ImageSpacing="5px">
                              </LoadingPanel>
                          </Styles>
                          <StylesPager>
                              <PageNumber ForeColor="#3E4846">
                              </PageNumber>
                              <Summary ForeColor="#1E395B">
                              </Summary>
                          </StylesPager>
                          <StylesEditors ButtonEditCellSpacing="0">
                          </StylesEditors>
                      </dx:ASPxPivotGrid>



                    <dx:ASPxPopupControl ID="ASPxPopupControl1" Modal="True" runat="server" Height="1px"
        AllowDragging="True" ClientInstanceName="DrillDownWindow" Left="200" Top="200"
        CloseAction="CloseButton" Width="153px" HeaderText="Detalle" 
                          CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                          CssPostfix="Office2010Blue" EnableHotTrack="False" 
                          SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
                        </LoadingPanelImage>
                        <HeaderStyle>
                        <Paddings PaddingLeft="7px" />
                        </HeaderStyle>
                        <LoadingPanelStyle ImageSpacing="5px">
                        </LoadingPanelStyle>
        <ContentCollection>
            <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
                <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" ClientInstanceName="GridView"
                    OnCustomCallback="ASPxGridView1_CustomCallback" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Width="600px" 
                    KeyFieldName="Id_ven_sell_in_out_stock">
                    <ClientSideEvents EndCallback="function(s, e) { DrillDownWindow.SetSize(0, 100, 100); }" />
                    <Columns>
                        <dx:GridViewDataTextColumn Caption="Tipo" FieldName="Tipo" VisibleIndex="0" 
                            Width="80px" />
                        <dx:GridViewDataTextColumn Caption="Ruedas" FieldName="Ruedas" VisibleIndex="1" 
                            Width="60px" />
                        <dx:GridViewDataDateColumn Caption="Modelo" FieldName="Modelo" VisibleIndex="2" 
                            Width="150px" />
                        <dx:GridViewDataTextColumn Caption="Cantidad" FieldName="Cantidad" 
                            VisibleIndex="4" Width="100px" >
                            <DataItemTemplate>
                                <dx:ASPxSpinEdit ID="seCantidad" runat="server" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" Height="21px" Spacing="0" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                    Value='<%# Bind("Cantidad") %>' Width="100px">
                                    <SpinButtons HorizontalSpacing="0">
                                    </SpinButtons>
                                    <Paddings PaddingLeft="5px" />
                                </dx:ASPxSpinEdit>
                            </DataItemTemplate>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Id" FieldName="Id_ven_sell_in_out_stock" 
                            VisibleIndex="5" Visible="False" />
                        <dx:GridViewDataTextColumn Caption="Color" FieldName="DES_COLOR" 
                            ShowInCustomizationForm="True" VisibleIndex="3" Width="100px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption=" " ShowInCustomizationForm="True" 
                            VisibleIndex="3" Width="35px">
                            <DataItemTemplate>
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr>
                                        <td style="width: 19px">
                                            <asp:Panel ID="pnColor" runat="server" 
                                                BackColor='<%# System.Drawing.ColorTranslator.FromHtml(Eval("COD_HTML").ToString()) %>' 
                                                Height="15px" Width="15px">
                                            </asp:Panel>
                                        </td>
                                        <td>
                                            <asp:Panel ID="pnColor2" runat="server" 
                                                BackColor='<%# System.Drawing.ColorTranslator.FromHtml(Eval("COD_HTML2").ToString()) %>' 
                                                Height="15px" Width="15px">
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                </table>
                            </DataItemTemplate>
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsBehavior AllowDragDrop="False" AllowGroup="False" AllowSort="False" />
                    <SettingsLoadingPanel Mode="ShowOnStatusBar" />
                    <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanelOnStatusBar>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </Images>
                    <ImagesFilterControl>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </ImagesFilterControl>
                    <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue">
                        <Header ImageSpacing="5px" SortingImageSpacing="5px" />
                        <LoadingPanel ImageSpacing="5px">
                        </LoadingPanel>
                    </Styles>
                    <StylesPager>
                        <PageNumber ForeColor="#3E4846">
                        </PageNumber>
                        <Summary ForeColor="#1E395B">
                        </Summary>
                    </StylesPager>
                    <StylesEditors ButtonEditCellSpacing="0">
                        <ProgressBar Height="21px">
                        </ProgressBar>
                    </StylesEditors>
                </dx:ASPxGridView>
                    <table width="100%">
                        <tr>
                            <td align="right">
                                <dx:ASPxButton ID="btnGrabarDetalle" runat="server" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" OnClick="btnGrabarDetalle_Click" 
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Grabar" 
                                    Width="100px">
                                    <Image Url="~/Images/save_16.gif">
                                    </Image>
                                </dx:ASPxButton>
                            </td>
                        </tr>
                </table>
                    </dx:PopupControlContentControl>
        </ContentCollection>
    </dx:ASPxPopupControl>



          <dx:ASPxPopupControl ID="popupErrores" runat="server" AllowDragging="True" 
                    ClientInstanceName="popupErrores" CloseAction="CloseButton" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
                    EnableViewState="False" HeaderText="Mensaje" Modal="True" 
                    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
              Width="300px" EnableHotTrack="False">
                
                    <HeaderImage Url="~/Images/icon_message.png">
                    </HeaderImage>
                
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
                    </LoadingPanelImage>
                    <HeaderStyle>
                    <Paddings PaddingLeft="7px" />
                    </HeaderStyle>
                
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                
                 <ContentCollection>
<dx:popupcontrolcontentcontrol ID="PopupControlContentControl2" runat="server" 
                         SupportsDisabledAttribute="True">

    <br />
      <dx:aspxpanel ID="ASPxPanel3" runat="server" DefaultButton="btCreate">
                    <PanelCollection>
                        <dx:panelcontent ID="PanelContent2" runat="server">
                        <table width="100%">
                        <tr>
                        <td align="center" valign="middle">
                        
                        
                        
                            <asp:Label ID="lblMensaje" runat="server"></asp:Label>
                            <br /> &nbsp;</td>
                        
                        </tr>
                        <tr>
                        <td align="center">
                        
                       
                            <dx:aspxbutton ID="ASPxButton6" runat="server" AutoPostBack="False" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Aceptar" 
                                Width="10px">
                                <ClientSideEvents Click="function(s, e) {
	popupErrores.Hide();
}" />
                                <Image Url="~/Images/ok.png">
                                </Image>
                            </dx:aspxbutton>
                        
                        </td>
                        
                        </tr>
                        
                        
                        </table>




                 </dx:panelcontent>
    </PanelCollection>
   </dx:aspxpanel>
   </dx:popupcontrolcontentcontrol>
</ContentCollection>
                </dx:ASPxPopupControl>



    </div>
                  </asp:Content>
